package com.zelin.manager.controller;

import com.zyg.common.utils.R;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * ------------------------------
 * 功能：
 * 作者：WF
 * 微信：hbxfwf13590332912
 * 创建时间：2021/11/1-15:22
 * ------------------------------
 */
@Controller
public class HelloController {

    @GetMapping("/hello")
    public String hello(Model model){
        Map<String,String> map = new HashMap<>();
        map.put("name","张三");
        map.put("age","20");
        map.put("addr","上海");
        model.addAttribute("data",map);
        return "hello";   //真实的物理路径:/templates/hello.html
    }
}
